local skel = fk.CreateSkill{
  name = "#lb__zhijianr_choose",
}

Fk:loadTranslationTable{
  ["#lb__zhijianr_choose"] = "致笺",
}

skel:addEffect("active", {
  card_filter = Util.FalseFunc,
  interaction = function (self, player)
    return UI.ComboBox{
      choices = {"chained", "un-chained"}
    }
  end,
  target_filter = function (self, player, to_select, selected, selected_cards)
    if self.interaction.data == nil then return false end
    local n = 0
    for _, t in ipairs(selected) do
      n = n + t.hp
    end
    return (n + to_select.hp) <= self.extra_data.number and (to_select.chained == (self.interaction.data == "un-chained"))
  end,
  feasible = function (self, player, selected, selected_cards)
    return #selected > 0
  end,
})

return skel
